package createtable

import (
	"fmt"
	"study-plan/common/inits"
	"study-plan/common/models"
)

func CreateTable() {
	err := inits.DB.Debug().AutoMigrate(&models.User{}, &models.UserCar{}, &models.Coupon{}, &models.Course{}, &models.Order{}, &models.UserCoupon{})
	if err != nil {
		panic(err)
	}
	fmt.Println("数据迁移成功")
}
